52c26d
@@ -3,6 +3,7 @@
package org.springframework.roo.addon.gwt;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Reference;
 import org.apache.felix.scr.annotations.Service;
+import org.springframework.roo.classpath.converters.JavaTypeConverter;
 import org.springframework.roo.model.JavaPackage;
 import org.springframework.roo.model.JavaType;
 import org.springframework.roo.shell.CliAvailabilityIndicator;
@@ -47,61 +48,61 @@
public class GwtCommands implements CommandMarker {
 
 	@CliCommand(value = "web gwt proxy all", help = "Locates all entities in the project and creates GWT proxies")
 	public void proxyAll(
-		@CliOption(key = "package", mandatory = true, optionContext = "update", help = "The package in which created proxies will be placed") final JavaPackage javaPackage) {
+		@CliOption(key = "package", mandatory = true, optionContext = JavaTypeConverter.PROJECT, help = "The package in which created proxies will be placed") final JavaPackage javaPackage) {
 
 		gwtOperations.proxyAll(javaPackage);
 	}
 
 	@CliCommand(value = "web gwt proxy type", help = "Creates a GWT proxy based on the specified type")
 	public void proxyType(
-		@CliOption(key = "package", mandatory = true, optionContext = "update", help = "The package in which created proxies will be placed") final JavaPackage javaPackage,
-		@CliOption(key = "type", mandatory = true, help = "The type to base the created request on") final JavaType type) {
+		@CliOption(key = "package", mandatory = true, help = "The package in which created proxies will be placed") final JavaPackage javaPackage,
+		@CliOption(key = "type", mandatory = true, optionContext = JavaTypeConverter.PROJECT, help = "The type to base the created request on") final JavaType type) {
 
 		gwtOperations.proxyType(javaPackage, type);
 	}
 
 	@CliCommand(value = "web gwt request all", help = "Locates all entities in the project and creates GWT requests")
 	public void requestAll(
-		@CliOption(key = "package", mandatory = true, optionContext = "update", help = "The package in which created requests will be placed") final JavaPackage javaPackage) {
+		@CliOption(key = "package", mandatory = true, optionContext = JavaTypeConverter.PROJECT, help = "The package in which created requests will be placed") final JavaPackage javaPackage) {
 
 		gwtOperations.requestAll(javaPackage);
 	}
 
 	@CliCommand(value = "web gwt request type", help = "Creates a GWT proxy based on the specified type")
 	public void requestType(
-		@CliOption(key = "package", mandatory = true, optionContext = "update", help = "The package in which created requests will be placed") final JavaPackage javaPackage,
-		@CliOption(key = "type", mandatory = true, help = "The type to base the created request on") final JavaType type) {
+		@CliOption(key = "package", mandatory = true, help = "The package in which created requests will be placed") final JavaPackage javaPackage,
+		@CliOption(key = "type", mandatory = true, optionContext = JavaTypeConverter.PROJECT, help = "The type to base the created request on") final JavaType type) {
 
 		gwtOperations.requestType(javaPackage, type);
 	}
 
 	@CliCommand(value = "web gwt proxy request all", help = "Locates all entities in the project and creates GWT requests and proxies")
 	public void proxyAndRequestAll(
-		@CliOption(key = "package", mandatory = true, optionContext = "update", help = "The package in which created proxies and requests will be placed") final JavaPackage javaPackage) {
+		@CliOption(key = "package", mandatory = true, optionContext = JavaTypeConverter.PROJECT, help = "The package in which created proxies and requests will be placed") final JavaPackage javaPackage) {
 
 		gwtOperations.proxyAndRequestAll(javaPackage);
 	}
 
 	@CliCommand(value = "web gwt proxy request type", help = "Creates a proxy and request based on the specified type")
 	public void proxyAndRequestType(
-		@CliOption(key = "package", mandatory = true, optionContext = "update", help = "The package in which created proxies and requests will be placed") final JavaPackage javaPackage,
-		@CliOption(key = "type", mandatory = true, help = "The type to base the created proxy and request on") final JavaType type) {
+		@CliOption(key = "package", mandatory = true, help = "The package in which created proxies and requests will be placed") final JavaPackage javaPackage,
+		@CliOption(key = "type", mandatory = true, optionContext = JavaTypeConverter.PROJECT, help = "The type to base the created proxy and request on") final JavaType type) {
 
 		gwtOperations.proxyAndRequestType(javaPackage, type);
 	}
 
 	@CliCommand(value = "web gwt all", help = "Locates all entities in the project and creates GWT requests, proxies and creates the scaffold")
 	public void scaffoldAll(
-		@CliOption(key = "proxyPackage", mandatory = true, optionContext = "update", help = "The package in which created proxies will be placed") final JavaPackage proxyPackage,
-		@CliOption(key = "requestPackage", mandatory = true, optionContext = "update", help = "The package in which created requests will be placed") final JavaPackage requestPackage) {
+		@CliOption(key = "proxyPackage", mandatory = true, optionContext = JavaTypeConverter.PROJECT, help = "The package in which created proxies will be placed") final JavaPackage proxyPackage,
+		@CliOption(key = "requestPackage", mandatory = true, optionContext = JavaTypeConverter.PROJECT, help = "The package in which created requests will be placed") final JavaPackage requestPackage) {
 
 		gwtOperations.scaffoldAll(proxyPackage, requestPackage);
 	}
 
 	@CliCommand(value = "web gwt scaffold", help = "Creates a GWT request, proxy and scaffold for the specified")
 	public void scaffoldType(
-		@CliOption(key = "proxyPackage", mandatory = true, optionContext = "update", help = "The package in which created proxies will be placed") final JavaPackage proxyPackage,
-		@CliOption(key = "requestPackage", mandatory = true, optionContext = "update", help = "The package in which created requests will be placed") final JavaPackage requestPackage,
+		@CliOption(key = "proxyPackage", mandatory = true, optionContext = JavaTypeConverter.PROJECT, help = "The package in which created proxies will be placed") final JavaPackage proxyPackage,
+		@CliOption(key = "requestPackage", mandatory = true, optionContext = JavaTypeConverter.PROJECT, help = "The package in which created requests will be placed") final JavaPackage requestPackage,
 		@CliOption(key = "type", mandatory = true, help = "The type to base the created scaffold on") final JavaType type) {
 
 		gwtOperations.scaffoldType(proxyPackage, requestPackage, type);
